<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/10/18 10:41
 * Desc: 红包
 */
class Request_Api_V2_Envelope extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }

    public function get_enable_envelope()
    {
        $this->rules = [
            ['type_id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_member_envelope()
    {
        $this->validation->rule('mid',array('Rule_Member','need_member'));

        $this->rules = [
            ['status', ['digit', $this->rule_in_array([0, 1, 2])]],
            ['page', ['not_empty', 'digit', $this->rule_min(1)]],
            ['pagesize', ['digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_order_envelope_info()
    {
        $this->rules = [
            ['order_sn', ['not_empty']],
        ];

        return $this;
    }

    public function receive_envelope()
    {
        $this->validation->rule('mid',array('Rule_Member','need_member'));

        $this->rules = [
            ['envelope_order_id', ['not_empty', 'digit', $this->rule_min(1)]]
        ];

        return $this;
    }


}